const loginPage = [
  {
    path: '/login',
    name: 'login',
    component: () =>
      import(/* webpackChunkName: "Login" */ '../pages/login/Login')
  }
]
const testPage = [
  {
    path: '/map',
    name: 'map',
    component: () =>
        import(/* webpackChunkName: "Test" */ '../pages/test/testMap')
  }
]

const hotelPage = [
  {
    path: '/detail',
    name: 'detail',
    component: () =>
        import(/* webpackChunkName: "Test" */ '../pages/test/HotelDetails')
  }
]

const registerPage = [
  {
    path: '/register',
    name: 'register',
    component: () =>
        import(/* webpackChunkName: "Register" */ '../pages/login/Register')
  }
]
const mainPage = [
  {
    path: '/',
    redirect: '/login'
  },
  {
    path: '/main',
    name: 'main',
    component: () =>
      import(/* webpackChunkName: "Main" */ '../pages/main/Main'),
    children: [
      {
        path: 'first',
        name: 'first',
        component: () =>
            import(
              /* webpackChunkName: "Second" */ '../pages/main/routes/first/First'
            )
      },
      {
        path: 'second/second',
        name: 'second',
        component: () =>
            import(
              /* webpackChunkName: "First" */ '../pages/main/routes/order/Order'
            )
      },
      {
        path: 'user/userlist',
        name: 'userlist',
        component: () =>
            import(
              /* webpackChunkName: "First" */ '../pages/main/routes/user/userList'
            )
      },
      {
        path: 'usercenter/userdetali',
        name: 'usercenter',
        component: () =>
            import(
              /* webpackChunkName: "First" */ '../pages/main/routes/usercenter/UserDetali'
            )
      },
      {
        path: 'usercenter/order',
        name: 'order',
        component: () =>
            import(
              /* webpackChunkName: "First" */ '../pages/main/routes/usercenter/order'
            )
      }
      // {
      //   path: 'test/testMap',
      //   name: 'testMap',
      //   component: () =>
      //       import(
      //         /* webpackChunkName: "First" */ '../pages/test/testMap'
      //       )
      // }
    ]
  }
]

const errorPage = [
  {
    path: '/notFound',
    name: 'notFound',
    component: () =>
      import(/* webpackChunkName: "NotFound" */ '../pages/error/NotFound')
  },
  {
    path: '/forbidden',
    name: 'forbidden',
    component: () =>
      import(/* webpackChunkName: "Forbidden" */ '../pages/error/Forbidden')
  },
  {
    path: '/badGateway',
    name: 'badGateway',
    component: () =>
      import(/* webpackChunkName: "BadGateway" */ '../pages/error/BadGateway')
  },
  {
    path: '*',
    redirect: '/notFound'
  }
]
export default [...loginPage, ...mainPage, ...errorPage, ...registerPage, ...testPage, ...hotelPage]
